<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<title>Login</title>
</h:head>
<h:body>
	<h:form id="loginUsuario">
		<p:messages />
		<p:panelGrid columns="2" style="margin-top:20px">
			<h:outputLabel value="Nome:" for="nome" />
			<h:inputText value="#{usuarioBean.nome}" label="Nome" id="nome"
				size="45" maxlength="45" required="true"
				requiredMessage="Campo nome é obrigatório"
				validatorMessage="O nome deve conter entre 7 e 45 caracteres!">
				<f:validateLength minimum="7" maximum="45"></f:validateLength>
			</h:inputText>
			<h:outputLabel value="Senha:" for="senha" />
			<h:inputSecret value="#{usuarioBean.senha}" label="Senha" id="senha"
				size="15" maxlength="45" required="true" redisplay="true" />
		</p:panelGrid>
		<h:commandButton action="#{usuarioBean.efetuarLogin()}" value="Efetuar Login" />
	</h:form>
</h:body>
</html>